package com.msb.apiboss.service;

import com.msb.apiboss.feign.ServiceDriverUserClient;
import com.msb.commons.dto.Car;
import com.msb.commons.dto.DriverCarBindingRelationship;
import com.msb.commons.dto.DriverUser;
import com.msb.commons.response.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @Author: chshh
 * @version: 1.0
 */
@Service
public class DriverUserService {
    @Autowired
    private ServiceDriverUserClient serviceDriverUserClient;

    public ResponseResult addDriverUser(DriverUser driverUser){
        return serviceDriverUserClient.addDriverUser(driverUser);
    }

    public ResponseResult updateDriverUser(@RequestBody DriverUser driverUser){
        return serviceDriverUserClient.updateDriverUser(driverUser);
    }

    public ResponseResult addCar(@RequestBody Car car){
        return serviceDriverUserClient.addCar(car);
    }

    public ResponseResult bind(@RequestBody DriverCarBindingRelationship driverCarBindingRelationship){
        return serviceDriverUserClient.bind(driverCarBindingRelationship);
    }

    public ResponseResult unbind(@RequestBody DriverCarBindingRelationship driverCarBindingRelationship){
        return serviceDriverUserClient.unbind(driverCarBindingRelationship);
    }
}
